using System.ComponentModel.DataAnnotations;

namespace WL.Think.Abp.Dto;

/// <summary>
/// 基础分类创建DTO
/// </summary>
public class BaseCategoryCreateUpdateDto : BaseDto
{
    /// <summary>
    /// 分类名称
    /// </summary>
    [Required(ErrorMessage = "分类名称不能为空")]
    public string? Name { get; set; }

    /// <summary>
    /// 上级分类ID
    /// </summary>
    public Guid? ParentId { get; set; }

    /// <summary>
    /// 是否启用此分类
    /// </summary>
    public bool IsActive { get; set; }

    /// <summary>
    /// 分类描述
    /// </summary>
    public string? Description { get; set; }

    /// <summary>
    /// 序号
    /// </summary>
    [Range(0, int.MaxValue, ErrorMessage = "序号范围要从0开始")]
    public int Index { get; set; }
}
